#include "Tree.h"

void test1(){
    Node* root = AddNode(NULL, "a");
    AddNode(root,"b");
    AddNode(root,"d");
    Node* e = AddNode(root,"e");
    AddNode(e,"e1");
    AddNode(e,"e2");
    AddNode(root,"f");
    PreOrder(root);

    printf("size:%d\n",GetSize(root));

    Node* first = GetFirstChild(root);
    PreOrder(first);

    Node* second = GetNextSibling(first);
    PreOrder(second);

    printf("height:%d\n",GetHeight(root));

    DeleteChildren(root,2);
    DeleteChildren(root,2);
    PreOrder(root);

    PostOrder(root);
}

void test2(){
    Node* root = AddNode(NULL, "a");
    AddNode(root,"b");
    AddNode(root,"d");
    Node* e = AddNode(root,"e");
    AddNode(e,"e1");
    AddNode(e,"e2");
    AddNode(root,"f");

    LevelOrder(root);
}

int main() {
    test2();
    return 0;
}
